<?php
	/*
		CMA Version: 1.0
		Developed by: Eduetech.com
	*/
	
	require_once("settings.php");
	require_once("mysqldb.php");
	
	//Construct a db instance
	
	$db = new $sql_db();
	
	if(is_array($db->sql_connect(
							$db_host, 
							$db_user,
							$db_pass,
							$db_name, 
							$db_port,
							false, 
							false
	))) {
		die("Unable to connect to the database");
	}

	
	
	require_once("funcs.user.php");
	require_once("funcs.company.php");
	
	require_once("class.newcompany.php");
	/*
		Construct mailer
	*/	
	require_once 'swiftlib/swift_required.php';
	$SMTPPort = 465;                    // set the SMTP server port
	$SMTPHost = "smtp.gmail.com"; // SMTP server
	$SMTPUsername = "smtp1532012@gmail.com";    // SMTP server username
	$SMTPPassword = "a1233215";            // SMTP server password
	$server="localhost/cma";

	// Create the Transport
	$transport = Swift_SmtpTransport::newInstance($SMTPHost, $SMTPPort,'ssl')
	  ->setUsername($SMTPUsername)
	  ->setPassword($SMTPPassword )
	  ;
	// Create the Mailer using your created Transport
	$mailer = Swift_Mailer::newInstance($transport);
		require('libs/Smarty.class.php');
	$lang='en';
	require('errors.'.$lang.'.php');
	require('Security.php');
	$Security = new SmartSecurity;
	$smarty = new Smarty();
	$smarty->assign('server',$server);
	require_once("includes/file_upload_settings.php");
	
	session_start();
	
	
	
?>